package com.sunwayworld.basemodule.rm.hospital.resource.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import com.sunwayworld.basemodule.rm.hospital.resource.LimsHospitalInterfaceResource;
import com.sunwayworld.basemodule.rm.hospital.service.LimsHospitalInterfaceService;
import com.sunwayworld.framework.spring.annotation.GikamBean;
import com.sunwayworld.framework.log.annotation.Log;
import com.sunwayworld.framework.log.annotation.LogModule;
import com.sunwayworld.framework.log.annotation.LogType;
import com.sunwayworld.framework.restful.data.RestJsonWrapperBean;

@LogModule("医院接口")
@RestController
@GikamBean
public class LimsHospitalInterfaceResourceImpl implements LimsHospitalInterfaceResource {

    @Autowired
    private LimsHospitalInterfaceService limsHospitalInterfaceService;

    @Override
    public LimsHospitalInterfaceService getService() {
        return limsHospitalInterfaceService;
    }

    @Log(value = "新增医院接口", type = LogType.INSERT)
    @Override
    @RequestMapping(method = RequestMethod.POST)
    public Long insert(RestJsonWrapperBean wrapper) {
        return getService().insert(wrapper);
    }

    @Log("测试")
    @Override
    @RequestMapping(value = "/test_api",method = RequestMethod.POST)
    public void testApi(RestJsonWrapperBean wrapperBean) {
        getService().testApi(wrapperBean);
    }
}
